package com.zzt.springbootdemo.service;

import com.zzt.springbootdemo.mapper.MessageMapper;
import com.zzt.springbootdemo.model.MessageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description
 * User: panda
 * Date: 2025-03-17
 * Time: 21:24
 */
@Service
public class MessageService {

    @Autowired
    private MessageMapper messageMapper;

    public void addMessage(MessageInfo messageInfo) {
        messageMapper.insertMessage(messageInfo);
    }

    public List<MessageInfo> queryAll() {
        return messageMapper.queryAll();
    }
}
